[Experimental] Link a dashboard into a folder
curl --request PATCH \
--url http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--header 'X-Enable-Preview: <x-enable-preview>' \
--data '
{
"folder_id": "a1b2c3d4-0000-0000-0000-000000000000"
}
'import requests
url = "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder"
payload = { "folder_id": "a1b2c3d4-0000-0000-0000-000000000000" }
headers = {
"X-Enable-Preview": "<x-enable-preview>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Enable-Preview': '<x-enable-preview>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({folder_id: 'a1b2c3d4-0000-0000-0000-000000000000'})
};
fetch('http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'folder_id' => 'a1b2c3d4-0000-0000-0000-000000000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+json",
"X-Enable-Preview: <x-enable-preview>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder"
payload := strings.NewReader("{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Enable-Preview", "<x-enable-preview>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder")
.header("X-Enable-Preview", "<x-enable-preview>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["X-Enable-Preview"] = '<x-enable-preview>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}"
response = http.request(request)
puts response.read_body[Experimental] Link a dashboard into a folder
[Experimental] Link a dashboard into a folder
curl --request PATCH \
--url http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--header 'X-Enable-Preview: <x-enable-preview>' \
--data '
{
"folder_id": "a1b2c3d4-0000-0000-0000-000000000000"
}
'import requests
url = "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder"
payload = { "folder_id": "a1b2c3d4-0000-0000-0000-000000000000" }
headers = {
"X-Enable-Preview": "<x-enable-preview>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Enable-Preview': '<x-enable-preview>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({folder_id: 'a1b2c3d4-0000-0000-0000-000000000000'})
};
fetch('http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'folder_id' => 'a1b2c3d4-0000-0000-0000-000000000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+json",
"X-Enable-Preview: <x-enable-preview>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder"
payload := strings.NewReader("{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Enable-Preview", "<x-enable-preview>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder")
.header("X-Enable-Preview", "<x-enable-preview>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/folders/dashboards/{id}/folder")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["X-Enable-Preview"] = '<x-enable-preview>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"folder_id\": \"a1b2c3d4-0000-0000-0000-000000000000\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
HTTP Basic authentication using global administrator credentials (username and password).
Headers
Opt-in header required to access this experimental endpoint. Must be "true" (case-insensitive).
Path Parameters
Body
application/vnd.composer.v3+json
Request object for linking a dashboard or report into a folder
Id of the destination folder; must be a CUSTOM folder
Example:
"a1b2c3d4-0000-0000-0000-000000000000"
Response
204
No Content
Was this page helpful?